import type { DepartmentalSaveOrUpdateParams } from '@/types'
import { PAGING } from '@/constant'

export const defaultFormData: Partial<DepartmentalSaveOrUpdateParams> = {
  departName: '',
  parentId: null as any,
}

export const formRules = {
  manager: [
    {
      required: true,
      message: '负责人不能为空！',
      trigger: 'change',
    },
  ],
  departName: [
    {
      required: true,
      message: '部门不能为空！',
      trigger: 'change',
    },
  ],
  parentId: [
    {
      required: true,
      message: '所属部门不能为空！',
      trigger: 'change',
    },
  ],
  currentShareRole: [
    {
      required: true,
      message: '角色不能为空！',
      trigger: 'change',
    },
  ],
}

export const defaultPagingParams: any = {
  ...PAGING.PARAMS,
  name: '',
}
